<?php require VIEW_PATH."/header.php";?>
<body>
	<form method="post">
    <input type="hidden" name="shop_type_id" value="{{$field['shop_type_id']}}">
    <input type="hidden" name="attr_id" value="{{$field['attr_id']}}">
<table class="hd-table hd-table-form hd-form">
    <thead>
    <tr>
        <td colspan="2">修改属性</td>
    </tr>
    </thead>
    <tbody>
   
    <tr>
        <th>属性名称</th>
        <td>
            <input type="text" name="attr_name" value="{{$field['attr_name']}}">
        </td>
    </tr>
    
    <tr>
        <th>属性类型</th>
        <td>
        <label>
            <input type="radio" name="attr_type" value="1"
            {{if value="$field['attr_type']==1"}}checked{{endif}}
            >属性</label>
        <label>
            <input type="radio" name="attr_type" value="2"
            {{if value="$field['attr_type']==2"}}checked{{endif}}
            > 规格 </label>
            <span class="hd-validate-notice">
选择规格时必须选择“下拉列表”显示类型
            </span>
        </td>
    </tr>
    <tr>
        <th>表单类型</th>
        <td>
        <label>
            <input type="radio" name="show_type" value="1"
            {{if value="$field['show_type']==1"}}checked{{endif}}
            >文本框</label>
        
        <label>
            <input type="radio" name="show_type" value="2"
            {{if value="$field['show_type']==2"}}checked{{endif}}
            >下拉列表框 </label>
            <br/>
             <span class="hd-validate-notice">
                单选框、复选框、下拉列表框时必须输入属性值，每行一个值
             </span>
        </td>
    </tr>
    <tr>
        <th>列表选项</th>
        <td>
        {{if value="$field['show_type']==1"}}
       <textarea name="attr_value" class="hd-w300 hd-h100" disabled>{{$field['attr_value']}}</textarea>
       {{else}}
        <textarea name="attr_value" class="hd-w300 hd-h100">{{$field['attr_value']}}</textarea>
       {{endif}}
        </td>
    </tr>
    <tr>
        <td colspan="2">
        <button class="hd-btn hd-btn-primary">提交</button>
        <a href="{{__HISTORY__}}" class="hd-btn hd-btn-primary">返回</a>
        </td>
    </tr>
    </tbody>
</table>
</form>
<script type="text/javascript" src="App/Admin/View/ShopAttr/js.js"></script>
</body>
</html>